package net.cn_su.sharpeyes.beans;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by yzy on 2016/10/13.
 */
public class MessageInfo implements Parcelable {


    /**
     * id : 1
     * title : 文章1
     * content : <p>
     * 企鹅我去恶趣味去
     * </p>
     * <p>
     * 发嘎嘎噶
     * </p>
     * <p>
     * a 啊&nbsp;
     * </p>
     * author : 作者
     * receive_org_children : true
     * receive_type : 0
     * article_type : 分类1
     * organization : 通川区
     * receive_org : 通川区
     * cover : /system/attachments/avatars/000/000/343/original/u980.png?1476341123
     * created_at : 1476341123000
     */


    private int id;
    private String title;
    private String content;
    private String author;
    private boolean receive_org_children;
    private long created_at;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public boolean isReceive_org_children() {
        return receive_org_children;
    }

    public void setReceive_org_children(boolean receive_org_children) {
        this.receive_org_children = receive_org_children;
    }

    public long getCreated_at() {
        return created_at;
    }

    public void setCreated_at(long created_at) {
        this.created_at = created_at;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.title);
        dest.writeString(this.content);
        dest.writeString(this.author);
        dest.writeByte(this.receive_org_children ? (byte) 1 : (byte) 0);
        dest.writeLong(this.created_at);
    }

    public MessageInfo() {
    }

    protected MessageInfo(Parcel in) {
        this.id = in.readInt();
        this.title = in.readString();
        this.content = in.readString();
        this.author = in.readString();
        this.receive_org_children = in.readByte() != 0;
        this.created_at = in.readLong();
    }

    public static final Creator<MessageInfo> CREATOR = new Creator<MessageInfo>() {
        @Override
        public MessageInfo createFromParcel(Parcel source) {
            return new MessageInfo(source);
        }

        @Override
        public MessageInfo[] newArray(int size) {
            return new MessageInfo[size];
        }
    };
}

